<?php

namespace app\common\model;
use think\Model;
use traits\model\SoftDelete;

class User extends Model
{
	protected $pk = 'id';			//默认主键
	protected $table = 'my_user';	//
	use SoftDelete;
	protected $deleteTime = 'delete_time';
	
    
    protected $autoWriteTimestamp = true;
	protected $createTime = 'create_time';
	protected $updateTime = 'update_time';
	protected $dateFormat = 'Y年m月d日';
	
    public function getRoleAttr($value)
    {
        $role = [
           0=>'普通管理员',
            1=> '超级管理员'
        ];
        return $role[$value];
    }
	
}